<? include $_SERVER['DOCUMENT_ROOT'].'/fr/include/connexion.php'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Herbes de Chine</title>
		<link href="/fr/css/common.css" rel="stylesheet" type="text/css" />
		<link href="/fr/css/inside.css" rel="stylesheet" type="text/css" />
		<link href="/fr/css/admin.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
		﻿<div id="header">
			<table id="top">
				<tr>
					<td id="logo" rowspan="2"><a href="/fr/index.php"><img src="/img/common/header/logo.gif" alt="Herbes de Chine" /></a></td>
					<td id="connexion"></td>
				</tr>
				<tr>
					<td id="cart"></td>
				</tr>
			</table>
		</div>
		<div id="tools">
			<table>
				<tr>
					<td id="title">Liste des produits</td>
					<? include $_SERVER['DOCUMENT_ROOT']."/fr/admin/nav.php"; ?>
				</tr>
			</table>
		</div>
		<td id="search">
		    <table id="body" class="widescreen">
				<tr class="top"><td colspan="2"></td></tr>
			    <tr class="middle"><td class="content">
					<div id="form" class="double">
						<table class="clear">
							<?
							if(isset($_GET['sort'])) {
								$sortby = "ORDER BY `".$_GET['sort']."`";
								if($_GET['order']=="desc"){
									$sortby = $sortby." DESC";
									$sorton = "asc";
								} else {
									$sortby = $sortby." ASC";
									$sorton = "desc";
								}
							}
							?>
							<tr><td colspan="2">&nbsp;</td></tr>
							<tr><td><table>
							<tr class="title"><td><a href="?sort=pro_id&order=<? echo $sorton ?>">Référence</a></td><td><a href="?sort=pro_category&order=<? echo $sorton ?>">Catégorie</a></td><td><a href="?sort=pro_nom&order=<? echo $sorton ?>">Nom</a></td><td><a href="?sort=pro_prix&order=<? echo $sorton ?>">Prix</a></td><td></tr>
							<?
							$q1 = mysql_query("SELECT * FROM produit, category WHERE produit.pro_category = category.cat_id $sortby");
							while ($r1 = mysql_fetch_array($q1) ){ ?>
								<tr><td class="ligne" width="100px"><strong><? echo $r1['pro_id']."</strong></td><td>".$r1['cat_label']."</td><td>".$r1['pro_nom']." - ".$r1['pro_nom_cn']."</td><td>".$r1['pro_prix']." € / ".$r1['pro_poids']." gr (".$r1['pro_poidsnet']." gr)</td><td>"; ?> <a href="/fr/admin/pro_edi.php?id=<? echo $r1['pro_id']; ?>">Modifier</a> <a href="/fr/admin/pro_del.php?id=<? echo $r1['pro_id']; ?>">Supprimer</a> <a href="/fr/produits/article.php?id=<? echo $r1['pro_id']; ?>">Voir</a></td></tr>
							<? } ?>
							<tr><td><table>
							<tr><td colspan="2">&nbsp;</td></tr>
						</table>
						<div class="left">
							
						</div>
					</div>
				</td></tr>
				<tr class="bottom"><td colspan="2"></td></tr>
			</table>﻿
		</div>
	</body>
</html>
